home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / lisp / glisp / glisp.000 / GLISP.UNIX.TAR / closunix / closlex.cux < prev    next >
Encoding:
Text File  |  1995-04-03  |  12.3 KB  |  619 lines

  1. # include "stdio.h"
  2. # define U(x) x
  3. # define NLSTATE yyprevious=YYNEWLINE
  4. # define BEGIN yybgin = yysvec + 1 +
  5. # define INITIAL 0
  6. # define YYLERR yysvec
  7. # define YYSTATE (yyestate-yysvec-1)
  8. # define YYOPTIM 1
  9. # define YYLMAX 200
  10. # define output(c) putc(c,yyout)
  11. # define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getc(yyin))==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar)
  12. # define unput(c) {yytchar= (c);if(yytchar=='\n')yylineno--;*yysptr++=yytchar;}
  13. # define yymore() (yymorfg=1)
  14. # define ECHO fprintf(yyout, "%s",yytext)
  15. # define REJECT { nstr = yyreject(); goto yyfussy;}
  16. int yyleng; extern unsigned char yytext[];
  17. int yymorfg;
  18. extern unsigned char *yysptr, yysbuf[];
  19. int yytchar;
  20. FILE *yyin = {stdin}, *yyout = {stdout};
  21. extern int yylineno;
  22. struct yysvf { 
  23.     int yystoff;
  24.     struct yysvf *yyother;
  25.     int *yystops;};
  26. struct yysvf *yyestate;
  27. extern struct yysvf yysvec[], *yybgin;
  28. /*                                CLOS                          */
  29. /*        Scritto nel 1990-91-92 da Zoia Andrea Michele     */
  30. /*        Via Pergola #1 Tirano (SO) Tel. 0342-704210    */
  31.  
  32. #define CLOSLEX_L
  33. #include "clos.h"
  34. #include "closyacc.h"
  35.  
  36. #undef  input
  37. #define input() \
  38. (\
  39.     (\
  40.     ( yytchar=yysptr>yysbuf\
  41.           ?U(*--yysptr)\
  42.           :lisp_get_char(yacc_filein)\
  43.     )==10\
  44.         ?(yylineno++,yytchar)\
  45.         :yytchar\
  46.     )==EOF\
  47.     ?0\
  48.     :yytchar\
  49. )
  50.  
  51. int        sq_b_fl=FALSE;
  52. int        parcount=0;
  53. extern FILE    *yacc_filein;
  54.  
  55. # define YYNEWLINE 10
  56. yylex(){
  57. int nstr; extern int yyprevious;
  58. {
  59.   if(sq_b_fl){
  60.    if(parcount){
  61.       parcount--;
  62.       return ')';
  63.    }
  64.    sq_b_fl=FALSE;
  65.   }
  66.  }
  67. while((nstr = yylook()) >= 0)
  68. yyfussy: switch(nstr){
  69. case 0:
  70. if(yywrap()) return(0); break;
  71. case 1:
  72. ;
  73. break;
  74. case 2:
  75. {return yytext[0];}
  76. break;
  77. case 3:
  78. {return '\n';}
  79. break;
  80. case 4:
  81.     {parcount++;return '(';}
  82. break;
  83. case 5:
  84.     {parcount--;return ')';}
  85. break;
  86. case 6:
  87.     {
  88.             if(!parcount){
  89.                 return BAD_SQB_YY;
  90.             }
  91.             else{
  92.                 sq_b_fl=TRUE;
  93.                 parcount--;
  94.                 return ')';
  95.             }
  96.         }
  97. break;
  98. case 7:
  99. {
  100.             sscanf(yytext,"%ld",&yylval.integer);
  101.             return    INTEGER_YY;
  102.         }
  103. break;
  104. case 8:
  105.     {
  106.             sscanf(yytext,"%lf",&yylval.real);
  107.             return REAL_YY;
  108.         }
  109. break;
  110. case 9:
  111. {
  112.             yylval.ident=yytext;
  113.             if(!config.case_sensitive)
  114.             {  /* converte le lettere in upper-case */
  115.                /* es 'anDRea23*ee'-->'ANDREA23*EE' */
  116.                 while(*yylval.ident){
  117.                 if(*yylval.ident>='a' && *yylval.ident<='z')
  118.                     *yylval.ident=*yylval.ident-('a'-'A');
  119.                 yylval.ident++;
  120.                 }
  121.                 yylval.ident=yytext;
  122.             }
  123.             if(strlen(yytext)>config.max_id_lenght){
  124.                 yytext[config.max_id_lenght]=0;
  125.                 error(E_IDLONG,ERR_MWARN|ERR_TNORM|ERR_PSTRING,
  126.                 yytext);
  127.             }
  128.             return    IDENTIFIER_YY;
  129.         }
  130. break;
  131. case 10:
  132. {
  133.             if(yytext[strlen(yytext)-1]!='"')
  134.                 return BAD_STRING_YY;
  135.             if(strlen(yytext)>config.max_string_lenght+2){
  136.                 yytext[config.max_string_lenght+1]=0;
  137.                 error(E_STRLONG,ERR_MWARN|ERR_TNORM|ERR_PSTRING,
  138.                    &yytext[1]);
  139.             }else{
  140.                 yytext[strlen(yytext)-1]=0;
  141.             }
  142.             yylval.ident=&yytext[1];
  143.             return    STRING_YY;
  144.         }
  145. break;
  146. case 11:
  147.     {
  148.             if(config.bad_char_error){
  149.             yylval.integer=(n_int)yytext[0];
  150.             return BAD_CHAR_YY;
  151.             }
  152.             else{
  153.             sprintf(buf1,"Char '%c' ascii %i",yytext[0],yytext[0]);
  154.             error(E_BADCH,ERR_MWARN|ERR_PSTRING|ERR_TNORM,buf1);
  155.             }
  156.         }
  157. break;
  158. case -1:
  159. break;
  160. default:
  161. fprintf(yyout,"bad switch yylook %d",nstr);
  162. } return(0); }
  163. /* end of yylex */
  164.  
  165. int yyvstop[] = {
  166. 0,
  167.  
  168. 9,
  169. 11,
  170. 0,
  171.  
  172. 1,
  173. 11,
  174. 0,
  175.  
  176. 3,
  177. 0,
  178.  
  179. 11,
  180. 0,
  181.  
  182. 2,
  183. 11,
  184. 0,
  185.  
  186. 4,
  187. 11,
  188. 0,
  189.  
  190. 5,
  191. 11,
  192. 0,
  193.  
  194. 9,
  195. 11,
  196. 0,
  197.  
  198. 2,
  199. 11,
  200. 0,
  201.  
  202. 7,
  203. 9,
  204. 11,
  205. 0,
  206.  
  207. 11,
  208. 0,
  209.  
  210. 6,
  211. 11,
  212. 0,
  213.  
  214. 9,
  215. 0,
  216.  
  217. 1,
  218. 0,
  219.  
  220. 10,
  221. 0,
  222.  
  223. 7,
  224. 9,
  225. 0,
  226.  
  227. 8,
  228. 0,
  229.  
  230. 9,
  231. 0,
  232.  
  233. 10,
  234. 0,
  235.  
  236. 9,
  237. 0,
  238.  
  239. 8,
  240. 9,
  241. 0,
  242.  
  243. 8,
  244. 0,
  245. 0};
  246. # define YYTYPE unsigned char
  247. struct yywork { YYTYPE verify, advance; } yycrank[] = {
  248. 0,0,    0,0,    1,3,    0,0,    
  249. 0,0,    0,0,    0,0,    0,0,    
  250. 0,0,    0,0,    1,4,    1,5,    
  251. 0,0,    0,0,    4,16,    0,0,    
  252. 0,0,    0,0,    0,0,    0,0,    
  253. 0,0,    6,17,    0,0,    0,0,    
  254. 0,0,    0,0,    0,0,    0,0,    
  255. 0,0,    6,17,    6,18,    0,0,    
  256. 0,0,    0,0,    0,0,    1,6,    
  257. 1,7,    4,16,    0,0,    0,0,    
  258. 0,0,    1,8,    1,9,    0,0,    
  259. 1,10,    2,8,    2,9,    1,11,    
  260. 3,15,    1,12,    0,0,    2,11,    
  261. 19,25,    0,0,    6,18,    6,17,    
  262. 3,0,    3,0,    0,0,    0,0,    
  263. 1,13,    0,0,    0,0,    6,17,    
  264. 2,13,    0,0,    13,24,    0,0,    
  265. 6,17,    0,0,    1,3,    22,26,    
  266. 0,0,    0,0,    13,24,    13,5,    
  267. 0,0,    0,0,    0,0,    3,0,    
  268. 0,0,    3,0,    3,0,    0,0,    
  269. 0,0,    3,0,    3,0,    3,0,    
  270. 3,0,    6,17,    3,15,    3,0,    
  271. 0,0,    3,0,    1,14,    3,15,    
  272. 10,0,    10,0,    2,14,    13,24,    
  273. 13,24,    17,19,    25,19,    22,26,    
  274. 0,0,    3,0,    3,0,    0,0,    
  275. 13,24,    0,0,    19,19,    0,0,    
  276. 6,19,    13,24,    0,0,    0,0,    
  277. 3,15,    0,0,    0,0,    10,0,    
  278. 0,0,    10,0,    10,0,    0,0,    
  279. 0,0,    10,0,    10,0,    10,0,    
  280. 10,0,    0,0,    0,0,    10,0,    
  281. 0,0,    10,20,    13,24,    10,21,    
  282. 0,0,    12,0,    12,0,    0,0,    
  283. 3,0,    0,0,    0,0,    0,0,    
  284. 0,0,    10,0,    10,0,    11,22,    
  285. 11,22,    11,22,    11,22,    11,22,    
  286. 11,22,    11,22,    11,22,    11,22,    
  287. 11,22,    0,0,    0,0,    0,0,    
  288. 12,0,    0,0,    12,0,    12,0,    
  289. 0,0,    0,0,    12,0,    12,0,    
  290. 12,0,    12,0,    0,0,    0,0,    
  291. 12,0,    3,0,    12,20,    0,0,    
  292. 12,21,    15,0,    15,0,    0,0,    
  293. 10,0,    0,0,    0,0,    0,0,    
  294. 0,0,    0,0,    12,0,    12,0,    
  295. 0,0,    0,0,    0,0,    0,0,    
  296. 0,0,    21,0,    21,0,    0,0,    
  297. 0,0,    12,23,    0,0,    0,0,    
  298. 15,0,    0,0,    15,0,    15,0,    
  299. 0,0,    0,0,    15,0,    15,0,    
  300. 15,0,    15,0,    0,0,    0,0,    
  301. 15,0,    10,0,    15,0,    0,0,    
  302. 21,0,    0,0,    21,0,    21,0,    
  303. 0,0,    12,0,    21,0,    21,0,    
  304. 21,0,    21,0,    15,0,    15,0,    
  305. 21,0,    0,0,    21,20,    0,0,    
  306. 21,21,    23,0,    23,0,    0,0,    
  307. 0,0,    0,0,    0,0,    0,0,    
  308. 0,0,    0,0,    21,0,    21,0,    
  309. 0,0,    0,0,    0,0,    0,0,    
  310. 0,0,    0,0,    0,0,    0,0,    
  311. 0,0,    21,23,    12,0,    0,0,    
  312. 23,0,    0,0,    23,0,    23,0,    
  313. 0,0,    15,0,    23,0,    23,0,    
  314. 23,0,    23,0,    0,0,    23,27,    
  315. 23,0,    0,0,    23,0,    0,0,    
  316. 23,28,    0,0,    27,0,    27,0,    
  317. 0,0,    21,0,    0,0,    26,29,    
  318. 0,0,    26,29,    23,0,    23,0,    
  319. 26,30,    26,30,    26,30,    26,30,    
  320. 26,30,    26,30,    26,30,    26,30,    
  321. 26,30,    26,30,    15,0,    0,0,    
  322. 0,0,    27,0,    0,0,    27,0,    
  323. 27,0,    0,0,    0,0,    27,0,    
  324. 27,0,    27,0,    27,0,    0,0,    
  325. 0,0,    27,0,    21,0,    27,0,    
  326. 0,0,    27,28,    28,0,    28,0,    
  327. 0,0,    23,0,    0,0,    0,0,    
  328. 0,0,    0,0,    0,0,    27,0,    
  329. 27,0,    29,30,    29,30,    29,30,    
  330. 29,30,    29,30,    29,30,    29,30,    
  331. 29,30,    29,30,    29,30,    0,0,    
  332. 0,0,    28,0,    0,0,    28,0,    
  333. 28,0,    0,0,    0,0,    28,0,    
  334. 28,0,    28,0,    28,0,    0,0,    
  335. 0,0,    28,0,    23,0,    28,0,    
  336. 0,0,    28,28,    0,0,    0,0,    
  337. 0,0,    0,0,    27,0,    0,0,    
  338. 0,0,    0,0,    0,0,    28,0,    
  339. 28,0,    0,0,    0,0,    0,0,    
  340. 0,0,    0,0,    0,0,    0,0,    
  341. 0,0,    0,0,    0,0,    0,0,    
  342. 0,0,    0,0,    0,0,    0,0,    
  343. 0,0,    0,0,    0,0,    0,0,    
  344. 0,0,    0,0,    0,0,    0,0,    
  345. 0,0,    0,0,    0,0,    27,0,    
  346. 0,0,    0,0,    0,0,    0,0,    
  347. 0,0,    0,0,    28,0,    0,0,    
  348. 0,0,    0,0,    0,0,    0,0,    
  349. 0,0,    0,0,    0,0,    0,0,    
  350. 0,0,    0,0,    0,0,    0,0,    
  351. 0,0,    0,0,    0,0,    0,0,    
  352. 0,0,    0,0,    0,0,    0,0,    
  353. 0,0,    0,0,    0,0,    0,0,    
  354. 0,0,    0,0,    0,0,    0,0,    
  355. 0,0,    0,0,    0,0,    28,0,    
  356. 0,0};
  357. struct yysvf yysvec[] = {
  358. 0,    0,    0,
  359. -1,    0,        0,    
  360. -5,    yysvec+1,    0,    
  361. -47,    0,        yyvstop+1,
  362. 5,    0,        yyvstop+4,
  363. 0,    0,        yyvstop+7,
  364. -20,    0,        yyvstop+9,
  365. 0,    0,        yyvstop+11,
  366. 0,    0,        yyvstop+14,
  367. 0,    0,        yyvstop+17,
  368. -87,    yysvec+3,    yyvstop+20,
  369. 99,    0,        yyvstop+23,
  370. -128,    yysvec+3,    yyvstop+26,
  371. -65,    0,        yyvstop+30,
  372. 0,    0,        yyvstop+32,
  373. -168,    yysvec+3,    yyvstop+35,
  374. 0,    yysvec+4,    yyvstop+37,
  375. -9,    yysvec+6,    0,    
  376. 0,    0,        yyvstop+39,
  377. -18,    yysvec+6,    0,    
  378. 0,    yysvec+11,    0,    
  379. -184,    yysvec+3,    yyvstop+41,
  380. 2,    yysvec+11,    yyvstop+44,
  381. -224,    yysvec+3,    yyvstop+46,
  382. 0,    yysvec+13,    0,    
  383. -10,    yysvec+6,    yyvstop+48,
  384. 236,    0,        0,    
  385. -265,    yysvec+3,    yyvstop+50,
  386. -305,    yysvec+3,    yyvstop+52,
  387. 277,    0,        0,    
  388. 0,    yysvec+29,    yyvstop+55,
  389. 0,    0,    0};
  390. struct yywork *yytop = yycrank+431;
  391. struct yysvf *yybgin = yysvec+1;
  392. unsigned char yymatch[] = {
  393. 00  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  394. 01  ,011 ,012 ,01  ,01  ,01  ,01  ,01  ,
  395. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  396. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  397. 011 ,01  ,'"' ,'#' ,01  ,01  ,'#' ,'#' ,
  398. '#' ,'#' ,01  ,'+' ,'#' ,'+' ,'#' ,01  ,
  399. '0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,
  400. '0' ,'0' ,'#' ,'#' ,01  ,01  ,01  ,01  ,
  401. 01  ,01  ,01  ,01  ,01  ,'E' ,01  ,01  ,
  402. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  403. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  404. 01  ,01  ,01  ,01  ,01  ,'#' ,01  ,01  ,
  405. 01  ,01  ,01  ,01  ,01  ,'E' ,01  ,01  ,
  406. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  407. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  408. 01  ,01  ,01  ,01  ,01  ,01  ,'#' ,01  ,
  409. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  410. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  411. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  412. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  413. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  414. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  415. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  416. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  417. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  418. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  419. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  420. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  421. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  422. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  423. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  424. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  425. 0};
  426. unsigned char yyextra[] = {
  427. 0,0,0,0,0,0,0,0,
  428. 0,0,0,0,0,0,0,0,
  429. 0};
  430. /* @(#) $Revision: 42.1 $      */
  431. int yylineno =1;
  432. # define YYU(x) x
  433. # define NLSTATE yyprevious=YYNEWLINE
  434. /* char yytext[YYLMAX];
  435.  * ***** nls8 ***** */
  436. unsigned char yytext[YYLMAX];
  437. struct yysvf *yylstate [YYLMAX], **yylsp, **yyolsp;
  438. /* char yysbuf[YYLMAX];
  439.  * char *yysptr = yysbuf;
  440.  * ***** nls8 ***** */
  441. unsigned char yysbuf[YYLMAX];
  442. unsigned char *yysptr = yysbuf;
  443. int *yyfnd;
  444. extern struct yysvf *yyestate;
  445. int yyprevious = YYNEWLINE;
  446. yylook(){
  447.     register struct yysvf *yystate, **lsp;
  448.     register struct yywork *yyt;
  449.     struct yysvf *yyz;
  450.     int yych, yyfirst;
  451.     struct yywork *yyr;
  452. # ifdef LEXDEBUG
  453.     int debug;
  454. # endif
  455. /*    char *yylastch;
  456.  * ***** nls8 ***** */
  457.     unsigned char *yylastch;
  458.     /* start off machines */
  459. # ifdef LEXDEBUG
  460.     debug = 0;
  461. # endif
  462.     yyfirst=1;
  463.     if (!yymorfg)
  464.         yylastch = yytext;
  465.     else {
  466.         yymorfg=0;
  467.         yylastch = yytext+yyleng;
  468.         }
  469.     for(;;){
  470.         lsp = yylstate;
  471.         yyestate = yystate = yybgin;
  472.         if (yyprevious==YYNEWLINE) yystate++;
  473.         for (;;){
  474. # ifdef LEXDEBUG
  475.             if(debug)fprintf(yyout,"state %d\n",yystate-yysvec-1);
  476. # endif
  477.             yyt = &yycrank[yystate->yystoff];
  478.             if(yyt == yycrank && !yyfirst){  /* may not be any transitions */
  479.                 yyz = yystate->yyother;
  480.                 if(yyz == 0)break;
  481.                 if(yyz->yystoff == 0)break;
  482.                 }
  483.             *yylastch++ = yych = input();
  484.             yyfirst=0;
  485.         tryagain:
  486. # ifdef LEXDEBUG
  487.             if(debug){
  488.                 fprintf(yyout,"char ");
  489.                 allprint(yych);
  490.                 putchar('\n');
  491.                 }
  492. # endif
  493.             yyr = yyt;
  494.             if ( (int)yyt > (int)yycrank){
  495.                 yyt = yyr + yych;
  496.                 if (yyt <= yytop && yyt->verify+yysvec == yystate){
  497.                     if(yyt->advance+yysvec == YYLERR)    /* error transitions */
  498.                         {unput(*--yylastch);break;}
  499.                     *lsp++ = yystate = yyt->advance+yysvec;
  500.                     goto contin;
  501.                     }
  502.                 }
  503. # ifdef YYOPTIM
  504.             else if((int)yyt < (int)yycrank) {        /* r < yycrank */
  505.                 yyt = yyr = yycrank+(yycrank-yyt);
  506. # ifdef LEXDEBUG
  507.                 if(debug)fprintf(yyout,"compressed state\n");
  508. # endif
  509.                 yyt = yyt + yych;
  510.                 if(yyt <= yytop && yyt->verify+yysvec == yystate){
  511.                     if(yyt->advance+yysvec == YYLERR)    /* error transitions */
  512.                         {unput(*--yylastch);break;}
  513.                     *lsp++ = yystate = yyt->advance+yysvec;
  514.                     goto contin;
  515.                     }
  516.                 yyt = yyr + YYU(yymatch[yych]);
  517. # ifdef LEXDEBUG
  518.                 if(debug){
  519.                     fprintf(yyout,"try fall back character ");
  520.                     allprint(YYU(yymatch[yych]));
  521.                     putchar('\n');
  522.                     }
  523. # endif
  524.                 if(yyt <= yytop && yyt->verify+yysvec == yystate){
  525.                     if(yyt->advance+yysvec == YYLERR)    /* error transition */
  526.                         {unput(*--yylastch);break;}
  527.                     *lsp++ = yystate = yyt->advance+yysvec;
  528.                     goto contin;
  529.                     }
  530.                 }
  531.             if ((yystate = yystate->yyother) && (yyt = &yycrank[yystate->yystoff]) != yycrank){
  532. # ifdef LEXDEBUG
  533.                 if(debug)fprintf(yyout,"fall back to state %d\n",yystate-yysvec-1);
  534. # endif
  535.                 goto tryagain;
  536.                 }
  537. # endif
  538.             else
  539.                 {unput(*--yylastch);break;}
  540.         contin:
  541. # ifdef LEXDEBUG
  542.             if(debug){
  543.                 fprintf(yyout,"state %d char ",yystate-yysvec-1);
  544.                 allprint(yych);
  545.                 putchar('\n');
  546.                 }
  547. # endif
  548.             ;
  549.             }
  550. # ifdef LEXDEBUG
  551.         if(debug){
  552.             fprintf(yyout,"stopped at %d with ",*(lsp-1)-yysvec-1);
  553.             allprint(yych);
  554.             putchar('\n');
  555.             }
  556. # endif
  557.         while (lsp-- > yylstate){
  558.             *yylastch-- = 0;
  559.             if (*lsp != 0 && (yyfnd= (*lsp)->yystops) && *yyfnd > 0){
  560.                 yyolsp = lsp;
  561.                 if(yyextra[*yyfnd]){        /* must backup */
  562.                     while(yyback((*lsp)->yystops,-*yyfnd) != 1 && lsp > yylstate){
  563.                         lsp--;
  564.                         unput(*yylastch--);
  565.                         }
  566.                     }
  567.                 yyprevious = YYU(*yylastch);
  568.                 yylsp = lsp;
  569.                 yyleng = yylastch-yytext+1;
  570.                 yytext[yyleng] = 0;
  571. # ifdef LEXDEBUG
  572.                 if(debug){
  573.                     fprintf(yyout,"\nmatch ");
  574.                     sprint(yytext);
  575.                     fprintf(yyout," action %d\n",*yyfnd);
  576.                     }
  577. # endif
  578.                 return(*yyfnd++);
  579.                 }
  580.             unput(*yylastch);
  581.             }
  582.         if (yytext[0] == 0  /* && feof(yyin) */)
  583.             {
  584.             yysptr=yysbuf;
  585.             return(0);
  586.             }
  587.         yyprevious = yytext[0] = input();
  588.         if (yyprevious>0)
  589.             output(yyprevious);
  590.         yylastch=yytext;
  591. # ifdef LEXDEBUG
  592.         if(debug)putchar('\n');
  593. # endif
  594.         }
  595.     }
  596. yyback(p, m)
  597.     int *p;
  598. {
  599. if (p==0) return(0);
  600. while (*p)
  601.     {
  602.     if (*p++ == m)
  603.         return(1);
  604.     }
  605. return(0);
  606. }
  607.     /* the following are only used in the lex library */
  608. yyinput(){
  609.     return(input());
  610.     }
  611. yyoutput(c)
  612.   int c; {
  613.     output(c);
  614.     }
  615. yyunput(c)
  616.    int c; {
  617.     unput(c);
  618.     }
  619.